import { SearchBar } from '@components/common/searchBar/searchBar'
import { ReactComponentExt } from '@helpers/ReactExt'
import * as React from 'react'
import { common } from '../../../assetsConfig'
import * as styles from './header.less'

const Comp = React.forwardRef((props, ref) => {
  return <div />
})

export interface HeaderProps { a: number, b: number, children?: any }

export class Header extends ReactComponentExt<HeaderProps, {}> {
  public ref!: React.RefObject<{}>

  public init(): void {
    // todo
    this.ref = React.createRef()
  }

  public componentDidMount() {
    // todo
  }

  public render() {
    return (
      <div className={styles.header}>
        <div className='inner'>
          <div className='logo-box'>
            <img src={common.logo} />
          </div>
          <Comp ref={this.ref} />
          <SearchBar />
        </div>
      </div>
    )
  }
}
